#ifndef _SERIAL_H
#define _SERIAL_H

#include <QApplication>
#include <QDataStream>
#include <QFile>
#include <QString>
#include <QThread>
#include <QQueue>

#include "tips.hpp"


class Serial : public QThread {
    Q_OBJECT;
public:
    QQueue<Packet_0x8F_AB> queuePacket_0x8F_AB;
    Serial(const QString& fileName);
    virtual void run();
    void parsePacket(quint8 packetId);

signals:
    /* void gotPacket(quint8 packetNum); */
private:
    QDataStream io;
    QFile deviceFile;
private slots:

};
#endif /* _SERIAL_H */

